package com.ibm.spatiotemp.tools;

public class STSPoint {
	public long t;	
	public double x;
	public double y;
	
	public STSPoint(long t, double x, double y) {
		this.t = t;
		this.x = x;
		this.y = y;
	}
	
	public STSPoint(long t, String pointStr){
		this.t = t;
		int index1 = pointStr.indexOf("(");
		int index2 = pointStr.indexOf(")");
		String temp1 = pointStr.substring(index1+1, index2).trim();
		index1 = temp1.indexOf(" ");
		String xStr = temp1.substring(0, index1).trim();
		this.x = Double.parseDouble(xStr);
		String yStr = temp1.substring(index1+1).trim();
		this.y = Double.parseDouble(yStr);
	}	

}
